<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="/WEB-INF/tld/pageable.tld" prefix="pageable"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
<c-rt:if test="${!empty param.id}">
<c-rt:set var="result" value="${pu:get('com.yaodian100.crm.workorder.entity.Holiday', pu:toLong(param.id))}"/>
</c-rt:if>

<c-rt:set var="menu" value="${pu:get('com.yaodian100.core.menu.entity.Menu', 'WorkOrderHoliday.class')}"/>

<br />
<h1>工单假日管理

</h1>
<form name="updateHolidayForm" method="post">
<input type="hidden" name="id" value="${result.id }"/>
<table class="tb-1" width="100%">

			<tr>
				<th></th><td></td>
			</tr>
			<tr>
				<th>行事历类别</th><td>
				
				<select name="menuOptionId">
				<c-rt:forEach items="${menu.options}" var="option">
					<option value="${option.value.oid }">${option.value.name }</option>
					
				</c-rt:forEach>
				</select>
				</td>
				</tr>
			<tr>
				<th>假日日期<br/>(yyyy/MM/dd)</th><td><input type="text" id="day" name="day" value="<fmt-rt:formatDate value="${result.day}" pattern="yyyy/MM/dd"/>"/></td>
				</tr>
			<tr>
				<th>假日名称</th><td><input type="text" name="name" value="${result.name}"/></td>
				</tr>
			<tr>
				<th></th><td>
				<input type="button" id="submit_button" value="送出"/>
				<input type="reset" value="重设"/>
				</td>
			</tr>
	</table>
</form>
<script>
$(document).ready(function(){

	$('#submit_button').click(function(){
		doAR('<%=application.getContextPath() %>/workOrder/holiday/updateHoliday.do', 'dialog', 'updateHolidayForm',
				function(){
				doAR('<%=application.getContextPath() %>/workOrder/holiday/page.do?iamlazy=list', 'main');
			}
				);
	});
});
</script>